import request from '@/utils/request'

export default {

  //获取实习记录List
  getLeaveList(current, limit, internQuery) {
    return request({
      url: `/intern/user-leave/list/${current}/${limit}`,
      method: 'post',
      data: internQuery
    })
  },

  //通过请假id获取对应的请假记录
  getLeaveById(id) {
      return request({
          url: `/intern/user-leave/info/${id}`,
          method: "get"
      })
  },

  //添加or更新请假记录
  saveOrUpdateLeave(leave) {
      return request({
          url: `/intern/user-leave/saveOrUpdate`,
          method: 'post',
          data: leave
      })
  },

  //通过请假id删除对应的请假记录
  deleteLeaveById(id) {
      return request({
          url: `/intern/user-leave/delete/${id}`,
          method: 'delete'
      })
  }

}